package com.zhongjinkang.rhythm.uiBean

import android.text.Editable
import android.util.Log
import android.view.View
import androidx.databinding.Bindable

class UserInfoBean(
    @Bindable
    private var name: String,
    @Bindable
    private var url: String
) : BaseBean() {

    @Bindable
    var sexString: String = "女"


    var sex: Int = 0
        set(value) {
            field = value;
            sexString = if (value == 1) {
                "男"
            } else {
                "女"
            }
             notifyPropertyChanged(com.zhongjinkang.rhythm.BR.sexString)

        }


    fun setName(name: String) {
        this.name = name;
        notifyPropertyChanged(com.zhongjinkang.rhythm.BR.name)


    }

    fun getName(): String {
        return name
    }

    fun setUrl(url: String) {
        this.url = url;
        notifyPropertyChanged(com.zhongjinkang.rhythm.BR.url)


    }

    fun getUrl(): String {
        return url
    }

    fun changeImage() {
        setUrl("1https://8xhnx.xyz:8443/p/2018/11/03003150/2018-11-02_16-31-49_124862.webp")
    }

    fun onLogOut(v:View){
    }


    fun onEditInput(s: Editable) {
//        setName( s.toString())

    }
}

